-
Notifications
You must be signed in to change notification settings - Fork 717
Fix wasm-issue#702 add feature flag #6726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/clarity-wasm-develop
Are you sure you want to change the base?
Fix wasm-issue#702 add feature flag #6726
Conversation
Codecov Report❌ Patch coverage is
❌ Your project check has failed because the head coverage (27.59%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## feat/clarity-wasm-develop #6726 +/- ##
=============================================================
- Coverage 30.91% 27.59% -3.32%
=============================================================
Files 572 572
Lines 358768 358773 +5
=============================================================
- Hits 110903 99015 -11888
- Misses 247865 259758 +11893
... and 160 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
| if cfg!(feature = "clarity-wasm") { | ||
| assert!(err_str | ||
| .find("TypeError(CallableType(Trait(TraitIdentifier") | ||
| .is_some()); | ||
| } else { | ||
| assert!(err_str | ||
| .find("TypeValueError(OptionalType(CallableType(Trait(TraitIdentifier") | ||
| .is_some()); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the procedure is identical with both features, how about having a variable that would contain the expected error string, and then call assert!(err_str.find(expected_err).is_some()).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking more of something like:
let expected_err = if cfg!(...) {...} else {...};
assert!(err.str.contains(expected_err));There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's way cleaner, changed it. Thank you!
This PR adds a
clarity-wasmfeature flag for certain Clarity1 errors as the WASM and interpreter error behaviors differ slightly, even though they represent the same underlying meaning.Closes: stx-labs/clarity-wasm#702